package fr.n7.sma.model.listeners.events;

import fr.n7.sma.model.ICell;

public class CellEvent<CellProperty> {

	public enum EventType {ATTRACTOR_CHANGED, RESOURCE_NUMBER_CHANGED};
	
	private EventType eventType;
	private ICell<CellProperty> cell;
	private String resourceName;
	private short resourceNumberModification;
	
	public CellEvent(ICell<CellProperty> cell, EventType attractorEvent){
		this.cell = cell;
		this.eventType = attractorEvent;
	}

	public CellEvent(ICell<CellProperty> cell, String resourceName, short resourceNumberModification){
		this.cell = cell;
		this.eventType = EventType.RESOURCE_NUMBER_CHANGED;
		this.resourceName = resourceName;
		this.resourceNumberModification = resourceNumberModification;
	}

	public String getResourceName() {
		return resourceName;
	}

	public short getResourceNumberModification() {
		return resourceNumberModification;
	}

	public ICell<CellProperty> getCell() {
		return cell;
	}

	public EventType getEventType() {
		return eventType;
	}
}
